    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// 发送验证码
export const sendCode = (mobile:any) => {
    return service({
        url: '/user/index/sendCode/' + mobile,
        method: 'post'
    })
};


// 注册
export const userReg = (data:any) => {
    return service({
        url: '/user/index/userReg',
        method: 'post',
        data
    })
};
// 登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// 获取商品列表
export const getProdList = (data:any) => {
    return service({
        url: '/prod/index/getProdList',
        method: 'post',
        data
    })
};
// 获取菜单树
export const getTreeMenu = () => {
    return service({
        url: '/user/index/getTreeMenu',
        method: 'post',
    })
};
// 获取角色
export const getRoleByUserId = () => {
    return service({
        url: '/user/index/getRoleByUserId',
        method: 'post',
    })
};
// 获取品牌列表
export const getBrandList = (data:any) => {
    return service({
        url: '/prod/brand/getBrandList',
        method: 'post',
        data
    })
};
// 获取添加品牌
export const addBrand = (data:any) => {
    return service({
        url: '/prod/brand/addBrand',
        method: 'post',
        data
    })
};
// 获取修改品牌状态
export const updateBrand = (data:any) => {
    return service({
        url: '/prod/brand/updateBrand',
        method: 'post',
        data
    })
};
// 获取类型列表
export const getTypeTree = (data:any) => {
    return service({
        url: '/prod/type/getTypeTree',
        method: 'post',
        data
    })
};
// 获取添加类型
export const addType = (data:any) => {
    return service({
        url: '/prod/type/addType',
        method: 'post',
        data
    })
};
// 批量删除
export const deleteByIds = (data:any) => {
    return service({
        url: '/prod/index/deleteByIds',
        method: 'post',
        data
    })
};
// 获取字典表数据
export const getDictList = (dictType:any) => {
    return service({
        url: '/prod/dict/getDictList/'+dictType,
        method: 'post',
        
    })
};
// 获取类型树
export const selectType = () => {
    return service({
        url: '/prod/type/selectType',
        method: 'post',
    })
};
// 添加类型树
export const addProd = (data:any) => {
    return service({
        url: '/prod/index/addProd',
        method: 'post',
        data
    })
};
// 添加商品附件
export const addProdAtta = (data:any) => {
    return service({
        url: '/prod/index/addProdAtta',
        method: 'post',
        data
    })
};
// 获取订单列表
export const getOrderList = (data:any) => {
    return service({
        url: '/prod/order/getOrderList',
        method: 'post',
        data
    })
};
// 批量删除订单列表
export const deleteBatchByOrderId = (data:any) => {
    return service({
        url: '/prod/order/deleteBatchByOrderId',
        method: 'post',
        data
    })
};
// 获取商品详情表
export const getProdInfo = () => {
    return service({
        url: '/prod/order/getProdInfo',
        method: 'post',
    })
};
// 添加订单
export const addOrder = (data:any) => {
    return service({
        url: '/prod/order/addOrder',
        method: 'post',
        data
    })
};
// 添加订单
export const addProdInfo = (data:any) => {
    return service({
        url: '/prod/prodInfo/addProdInfo',
        method: 'post',
        data
    })
};
// 添加订单
export const selectProdInfo = (prodId:any) => {
    return service({
        url: '/prod/prodInfo/selectProdInfo/'+prodId,
        method: 'post',
    
    })
};
// 添加订单
export const selectProdInfoByProdId = (data:any,prodId:any) => {
    return service({
        url: '/prod/prodInfo/selectProdInfoByProdId/'+prodId,
        method: 'post',
        data
    })
};
// 获取拼团活动列表
export const getGroupActiveList = (data:any) => {
    return service({
        url: '/group/groupActive/getGroupActiveList',
        method: 'post',
        data
    })
};
// 修改拼团活动列表
export const updateGroupActive = (data:any) => {
    return service({
        url: '/group/groupActive/updateGroupActive',
        method: 'post',
        data
    })
};
// 添加拼团活动列表
export const addGroupActive = (data:any) => {
    return service({
        url: '/group/groupActive/addGroupActive',
        method: 'post',
        data
    })
};
// 删除拼团活动列表
export const deleteById = (activeId:any) => {
    return service({
        url: '/group/groupActive/deleteById/'+activeId,
        method: 'post',
       
    })
};
// 查询拼团活动列表(商家)
export const getGroupJoinList = (data:any) => {
    return service({
        url: '/group/groupJoin/getGroupJoinList',
        method: 'post',
       data
    })
};
// 添加拼团活动列表(商家)
export const addGroupJoin = (data:any) => {
    return service({
        url: '/group/groupJoin/addGroupJoin',
        method: 'post',
       data
    })
};
// 修改拼团活动列表(商家)
export const updateGroupJoin = (data:any) => {
    return service({
        url: '/group/groupJoin/updateGroupJoin',
        method: 'post',
       data
    })
};

// 删除拼团活动列表(商家)
export const deleteByjoinId = (joinId:any) => {
    return service({
        url: '/group/groupJoin/deleteById/'+joinId,
        method: 'post',
    })
};

// 拼团活动
export const getGroupList = (data:any) => {
    return service({
        url: '/group/group/getGroupList',
        method: 'post',
       data
    })
};
// 查询活动
export const getActiveList = (data:any) => {
    return service({
        url: '/active/index/getActiveList',
        method: 'post',
       data
    })
};
// 添加活动
export const addActive = (data:any) => {
    return service({
        url: '/active/index/addActive',
        method: 'post',
       data
    })
};
// 修改活动
export const updateActive = (data:any) => {
    return service({
        url: '/active/index/updateActive',
        method: 'post',
       data
    })
};
// 删除活动
export const deleteByActiveId = (activeId:any) => {
    return service({
        url: '/active/index/deleteById/'+activeId,
        method: 'post',
    })
};




